<template>
    <div>
        <my-table :loading="loading" :lists="tableData" @pageChange="handleChange" :sequence="true" :page='page'>     
            <el-table-column property="shopName" label="店铺名称" align='center'></el-table-column>
            <el-table-column property="goodsNum" label="商品数量" align='center'></el-table-column>
            <el-table-column property="businessName" label="商家名称" align='center'></el-table-column>
            <el-table-column property="shopCreateTime" label="创建时间" align='center'></el-table-column>
            <el-table-column property="payNum" label="累计成交笔数" align='center'></el-table-column>
            <el-table-column property="createTime" label="累计成交金额$" align='center'>
                <template slot-scope="scope">
                    <span>{{scope.row.payAmount.decimalFourString}}</span>
                </template>
            </el-table-column>
        </my-table>
    </div>
</template>
<script>
import {
    get_arLandmark_shop_list
} from '@/api/collext'
import myTable from '@/components/public/myTable';
export default {
    props:{
        id:''
    },
    components:{
        myTable
    },
    data(){
        return{
            search:{
                orderField:'',
                orderType:'',
            },
            loading:false,
            tableData:[],
            multipleSelectionIds:[],
            page:{
                pageSize:10,
                pageIndex:1,
                total:0,
            },
        }
    },
    created(){
        this.getList()
    },
    methods:{
        getList(){ 
            this.loading = true
            get_arLandmark_shop_list({
                arLandmarkId:this.id,
                limit: this.page.pageSize,
                page: this.page.pageIndex,
                ...this.search
            }).then(res=>{
                this.loading = false
                this.tableData = res.data
                this.page.total = res.total
            })
        },
        doSearch(){
            this.pageIndex = 1
            this.getList()
        },
        handleChange(index) {
            this.page.pageIndex = index;
            this.getList();
        },
        resetForm(){
            this.search.onlineStatus = ''
            this.search.merchantName = ''
            this.doSearch()
        }
    }
}
</script>
<style lang="scss" scoped>
    .tfjlcx{
        display: flex;
        border: 1px solid #eee;
        margin: 0 0 2px 0;
        padding: 10px 20px;
        height: 50px;
    }
</style>